package me.zhengjie.modules.weixin.message.custom;


import me.zhengjie.modules.weixin.enums.WeChatMsgTypeEnum;
import me.zhengjie.modules.weixin.message.reply.AbstractReplyMessage;
import org.apache.commons.lang3.StringUtils;

/**
 * 消息转发到指定客服
 * @since https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Forwarding_of_messages_to_service_center.html
 */
public class CustomTransInfoMessage extends AbstractReplyMessage {

    public CustomTransInfoMessage() {
        super();
        setMsgType(WeChatMsgTypeEnum.transfer_customer_service.name());
    }

    public CustomTransInfoMessage(String kfAccount) {
        this();
        if (StringUtils.isNotBlank(kfAccount)) {
            TransInfo transInfo = new TransInfo();
            transInfo.setKfAccount(kfAccount);
            this.TransInfo = transInfo;
        }
    }

    private TransInfo TransInfo;

    public CustomTransInfoMessage.TransInfo getTransInfo() {
        return TransInfo;
    }

    public void setTransInfo(CustomTransInfoMessage.TransInfo transInfo) {
        TransInfo = transInfo;
    }

    public static class TransInfo {
        private String KfAccount;

        public String getKfAccount() {
            return KfAccount;
        }

        public void setKfAccount(String kfAccount) {
            KfAccount = kfAccount;
        }
    }

    @Override
    public boolean isValidReply() {
        return true;
    }
}
